# This file is part of BlackArch Linux ( http://blackarch.org ).
# See COPYING for license details.

pkgname=aztarna
pkgver=1.2.1
pkgrel=8
pkgdesc='A footprinting tool for ROS and SROS systems.'
arch=('any')
url='https://github.com/aliasrobotics/aztarna'
groups=('blackarch' 'blackarch-recon' 'blackarch-fingerprint')
license=('GPL3')
depends=('python' 'python-aiohttp' 'python-aiohttp-xmlrpc' 'python-argcomplete'
         'python-asn1crypto' 'python-yarl' 'python-async-timeout' 'python-attrs'
         'python-babel' 'python-certifi' 'python-cffi' 'python-chardet'
         'python-click' 'python-click-plugins' 'python-colorama' 'python-idna'
         'python-cryptography' 'python-dnspython' 'python-docutils'
         'python-idna_ssl' 'python-imagesize' 'python-ipwhois' 'python-jinja'
         'python-lxml' 'python-markupsafe' 'python-multidict' 'python-packaging'
         'python-pycparser' 'python-pygments' 'python-pyparsing' 'python-pytz'
         'python-requests' 'python-scapy' 'python-shodan' 'python-six'
         'python-snowballstemmer' 'python-sphinx' 'python-urllib3'
         'python-sphinxcontrib-websupport' 'python-urllib3' 'python-uvloop'
         'python-xlsxwriter' 'python-property')
makedepends=('python-setuptools')
source=("https://files.pythonhosted.org/packages/source/${pkgname::1}/$pkgname/$pkgname-$pkgver.tar.gz"
        'setup.py.patch')
sha512sums=('66738d7d5911cd19a1e2eb68750b57223e0ca46b82c190d6a6f2aaeec9e1755636712925391958d5ec669f639cbb761ecef38470bdfcd835ebbeed87823cad9b'
            'b656a7a2bda9d1baf7bc0972e4bbf0b9e83aadfcd0ad1ed8ec31fdacbfdc882913cba6f90ec7a53506c5a679f8eb9af40c56926b1a81820d5f5b515e439c2167')

prepare() {
  patch -p1 < setup.py.patch
}

build() {
  cd "$pkgname-$pkgver"

  python setup.py build
}

package() {
  cd "$pkgname-$pkgver"

  python setup.py install --root="$pkgdir" --prefix=/usr -O1 --skip-build
}

